cmake_minimum_required(VERSION 3.22)
project(cmake05)
set(CMAKE_CXX_STANDARD 11)
# set(SRC main.cpp add.cpp mul.cpp)
# 搜索源文件
# aux_source_directory(${CMAKE_SOURCE_DIR} SRC)
file(GLOB SRC ${PROJECT_SOURCE_DIR}/src/*.cpp)
include_directories(${PROJECT_SOURCE_DIR}/include)
# message("## cmake_current_source_dir" ${CMAKE_CURRENT_SOURCE_DIR})
message("## PROJECT_SOURCE_DIR" ${PROJECT_SOURCE_DIR})
# set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/outputLib)
# add_executable(app ${SRC})
# 生成库，STATIC静态库 SHARED 动态库
add_library(calc STATIC ${SRC})